KEY
NOKEY

Syntax: KEY keynr, string$ 
    or: KEY keynr             (KEYMAN only)
    or: KEY                   (KEYMAN only)
   and: NOKEY                 (KEYMAN)
Location: FKEY, KEYMAN

The KEY command allows you to install keyboard short-cuts: that means if a certain key (specified with keynr) is pressed the specified string$ will be typed into the current keyboard queue. The actual implementation of the command under the two Toolkits is different, in that the FKEY variant only allows keynr to be in the range 1..5 representing the five function keys (F1 to F5).

The KEYMAN version allows keynr to be in the range 1...60, allowing the function keys and CTRL plus letters to be defined.

The KEYMAN variant allows the second syntax, KEY keynr, which allows you to check the current definition of keynr, which is then written to #0.  

KEY without any parameters activates the key translation if necessary. 

KEY keynr, "" can be used to clear a definition with the KEYMAN variant. 

The command NOKEY disables all current definitions of KEY (defined under KEYMAN)

Example:
KEY 5,"STAT"&CHR$(10)

CROSS-REFERENCE:
See ALTKEY for a concept similar to this one here.
